package com.huike.web.controller.business;

import com.huike.business.domain.TbBusinessTrackRecord;
import com.huike.business.domain.vo.BusinessTrackVo;
import com.huike.business.service.ITbBusinessTrackRecordService;
import com.huike.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.huike.common.core.controller.BaseController;

/**
 * 商机跟进记录Controller
 * @date 2021-04-28
 */
@RestController
@RequestMapping("/business/record")
public class TbBusinessTrackRecordController extends BaseController {

    @Autowired
    private ITbBusinessTrackRecordService batBusinessTrackRecordService;


    @GetMapping("/list")
    public AjaxResult getList(TbBusinessTrackRecord tbBusinessTrackRecord){

        return  AjaxResult.success(batBusinessTrackRecordService.selectTbBusinessTrackRecordList(tbBusinessTrackRecord));
    }

    @PostMapping
    public AjaxResult InsertBusinessFollow(@RequestBody BusinessTrackVo vo){
        batBusinessTrackRecordService.InsertBusinessFollow(vo);
        return AjaxResult.success();
    }

}
